<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span id="local-6989586621679115600"><span id="local-6989586621679115601"><span id="local-6989586621679115602"></span></span></span><span class="hs-pragma">{-# LANGUAGE CPP, OverloadedStrings #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- Module:    Data.Text.Lazy.Builder.RealFloat</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Copyright: (c) The University of Glasgow 1994-2002</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- License:   see libraries/base/LICENSE</span><span>
</span><span id="line-8"></span><span class="hs-comment">--</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- Write a floating point value to a 'Builder'.</span><span>
</span><span id="line-10"></span><span>
</span><span id="line-11"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Data.Text.Lazy.Builder.RealFloat</span><span>
</span><span id="line-12"></span><span>    </span><span class="hs-special">(</span><span>
</span><span id="line-13"></span><span>      </span><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#FPFormat"><span class="hs-identifier">FPFormat</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-14"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#realFloat"><span class="hs-identifier">realFloat</span></a></span><span>
</span><span id="line-15"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#formatRealFloat"><span class="hs-identifier">formatRealFloat</span></a></span><span>
</span><span id="line-16"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../array/src/Data.Array.Base.html#"><span class="hs-identifier">Data.Array.Base</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../array/src/Data.Array.Base.html#unsafeAt"><span class="hs-identifier">unsafeAt</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../array/src/Data.Array.IArray.html#"><span class="hs-identifier">Data.Array.IArray</span></a></span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Internal.Builder.Functions.html"><span class="hs-identifier">Data.Text.Internal.Builder.Functions</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator">(&lt;&gt;)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Builder.Functions.html#i2d"><span class="hs-identifier">i2d</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Lazy.Builder.Int.html"><span class="hs-identifier">Data.Text.Lazy.Builder.Int</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Lazy.Builder.Int.html#decimal"><span class="hs-identifier">decimal</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Internal.Builder.RealFloat.Functions.html"><span class="hs-identifier">Data.Text.Internal.Builder.RealFloat.Functions</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Builder.RealFloat.Functions.html#roundTo"><span class="hs-identifier">roundTo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Lazy.Builder.html"><span class="hs-identifier">Data.Text.Lazy.Builder</span></a></span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Data.Text.html"><span class="hs-identifier">Data.Text</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">T</span></span><span class="hs-cpp">
#if MIN_VERSION_base(4,11,0)
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator">(&lt;&gt;)</span></a></span><span class="hs-special">)</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-29"></span><span class="hs-comment">-- | Control the rendering of floating point numbers.</span><span>
</span><span id="line-30"></span><span class="hs-keyword">data</span><span> </span><span id="FPFormat"><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#FPFormat"><span class="hs-identifier hs-var">FPFormat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Exponent"><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#Exponent"><span class="hs-identifier hs-var">Exponent</span></a></span></span><span>
</span><span id="line-31"></span><span>              </span><span class="hs-comment">-- ^ Scientific notation (e.g. @2.3e123@).</span><span>
</span><span id="line-32"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span id="Fixed"><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#Fixed"><span class="hs-identifier hs-var">Fixed</span></a></span></span><span>
</span><span id="line-33"></span><span>              </span><span class="hs-comment">-- ^ Standard decimal notation.</span><span>
</span><span id="line-34"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span id="Generic"><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#Generic"><span class="hs-identifier hs-var">Generic</span></a></span></span><span>
</span><span id="line-35"></span><span>              </span><span class="hs-comment">-- ^ Use decimal notation for values between @0.1@ and</span><span>
</span><span id="line-36"></span><span>              </span><span class="hs-comment">-- @9,999,999@, and scientific notation otherwise.</span><span>
</span><span id="line-37"></span><span>                </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679115507"><span id="local-6989586621679115509"><span id="local-6989586621679115513"><span id="local-6989586621679115516"><span id="local-6989586621679115518"><span id="local-6989586621679115531"><span id="local-6989586621679115537"><span id="local-6989586621679115545"><span class="annot"><span class="annottext">Int -&gt; FPFormat
FPFormat -&gt; Int
FPFormat -&gt; [FPFormat]
FPFormat -&gt; FPFormat
FPFormat -&gt; FPFormat -&gt; [FPFormat]
FPFormat -&gt; FPFormat -&gt; FPFormat -&gt; [FPFormat]
(FPFormat -&gt; FPFormat)
-&gt; (FPFormat -&gt; FPFormat)
-&gt; (Int -&gt; FPFormat)
-&gt; (FPFormat -&gt; Int)
-&gt; (FPFormat -&gt; [FPFormat])
-&gt; (FPFormat -&gt; FPFormat -&gt; [FPFormat])
-&gt; (FPFormat -&gt; FPFormat -&gt; [FPFormat])
-&gt; (FPFormat -&gt; FPFormat -&gt; FPFormat -&gt; [FPFormat])
-&gt; Enum FPFormat
forall a.
(a -&gt; a)
-&gt; (a -&gt; a)
-&gt; (Int -&gt; a)
-&gt; (a -&gt; Int)
-&gt; (a -&gt; [a])
-&gt; (a -&gt; a -&gt; [a])
-&gt; (a -&gt; a -&gt; [a])
-&gt; (a -&gt; a -&gt; a -&gt; [a])
-&gt; Enum a
enumFromThenTo :: FPFormat -&gt; FPFormat -&gt; FPFormat -&gt; [FPFormat]
$cenumFromThenTo :: FPFormat -&gt; FPFormat -&gt; FPFormat -&gt; [FPFormat]
enumFromTo :: FPFormat -&gt; FPFormat -&gt; [FPFormat]
$cenumFromTo :: FPFormat -&gt; FPFormat -&gt; [FPFormat]
enumFromThen :: FPFormat -&gt; FPFormat -&gt; [FPFormat]
$cenumFromThen :: FPFormat -&gt; FPFormat -&gt; [FPFormat]
enumFrom :: FPFormat -&gt; [FPFormat]
$cenumFrom :: FPFormat -&gt; [FPFormat]
fromEnum :: FPFormat -&gt; Int
$cfromEnum :: FPFormat -&gt; Int
toEnum :: Int -&gt; FPFormat
$ctoEnum :: Int -&gt; FPFormat
pred :: FPFormat -&gt; FPFormat
$cpred :: FPFormat -&gt; FPFormat
succ :: FPFormat -&gt; FPFormat
$csucc :: FPFormat -&gt; FPFormat
</span><a href="../../base/src/GHC.Enum.html#Enum"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Enum</span></a></span></span></span></span></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679115493"><span id="local-6989586621679115499"><span id="local-6989586621679115502"><span id="local-6989586621679115504"><span class="annot"><span class="annottext">ReadPrec [FPFormat]
ReadPrec FPFormat
Int -&gt; ReadS FPFormat
ReadS [FPFormat]
(Int -&gt; ReadS FPFormat)
-&gt; ReadS [FPFormat]
-&gt; ReadPrec FPFormat
-&gt; ReadPrec [FPFormat]
-&gt; Read FPFormat
forall a.
(Int -&gt; ReadS a)
-&gt; ReadS [a] -&gt; ReadPrec a -&gt; ReadPrec [a] -&gt; Read a
readListPrec :: ReadPrec [FPFormat]
$creadListPrec :: ReadPrec [FPFormat]
readPrec :: ReadPrec FPFormat
$creadPrec :: ReadPrec FPFormat
readList :: ReadS [FPFormat]
$creadList :: ReadS [FPFormat]
readsPrec :: Int -&gt; ReadS FPFormat
$creadsPrec :: Int -&gt; ReadS FPFormat
</span><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Read</span></a></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679115485"><span id="local-6989586621679115487"><span id="local-6989586621679115489"><span class="annot"><span class="annottext">Int -&gt; FPFormat -&gt; ShowS
[FPFormat] -&gt; ShowS
FPFormat -&gt; [Char]
(Int -&gt; FPFormat -&gt; ShowS)
-&gt; (FPFormat -&gt; [Char]) -&gt; ([FPFormat] -&gt; ShowS) -&gt; Show FPFormat
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; [Char]) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [FPFormat] -&gt; ShowS
$cshowList :: [FPFormat] -&gt; ShowS
show :: FPFormat -&gt; [Char]
$cshow :: FPFormat -&gt; [Char]
showsPrec :: Int -&gt; FPFormat -&gt; ShowS
$cshowsPrec :: Int -&gt; FPFormat -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-38"></span><span>
</span><span id="line-39"></span><span class="hs-comment">-- | Show a signed 'RealFloat' value to full precision,</span><span>
</span><span id="line-40"></span><span class="hs-comment">-- using standard decimal notation for arguments whose absolute value lies</span><span>
</span><span id="line-41"></span><span class="hs-comment">-- between @0.1@ and @9,999,999@, and scientific notation otherwise.</span><span>
</span><span id="line-42"></span><span id="local-6989586621679115653"><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#realFloat"><span class="hs-identifier hs-type">realFloat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679115653"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679115653"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Builder.html#Builder"><span class="hs-identifier hs-type">Builder</span></a></span></span><span>
</span><span id="line-43"></span><span class="hs-pragma">{-# SPECIALIZE</span><span> </span><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#realFloat"><span class="hs-pragma hs-type">realFloat</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-pragma hs-type">Float</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Builder.html#Builder"><span class="hs-pragma hs-type">Builder</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-44"></span><span class="hs-pragma">{-# SPECIALIZE</span><span> </span><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#realFloat"><span class="hs-pragma hs-type">realFloat</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Builder.html#Builder"><span class="hs-pragma hs-type">Builder</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-45"></span><span id="realFloat"><span class="annot"><span class="annottext">realFloat :: forall a. RealFloat a =&gt; a -&gt; Builder
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#realFloat"><span class="hs-identifier hs-var hs-var">realFloat</span></a></span></span><span> </span><span id="local-6989586621679115481"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679115481"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FPFormat -&gt; Maybe Int -&gt; a -&gt; Builder
forall a. RealFloat a =&gt; FPFormat -&gt; Maybe Int -&gt; a -&gt; Builder
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#formatRealFloat"><span class="hs-identifier hs-var">formatRealFloat</span></a></span><span> </span><span class="annot"><span class="annottext">FPFormat
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#Generic"><span class="hs-identifier hs-var">Generic</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679115481"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="hs-comment">-- | Encode a signed 'RealFloat' according to 'FPFormat' and optionally requested precision.</span><span>
</span><span id="line-48"></span><span class="hs-comment">--</span><span>
</span><span id="line-49"></span><span class="hs-comment">-- This corresponds to the @show{E,F,G}Float@ operations provided by @base@'s &quot;Numeric&quot; module.</span><span>
</span><span id="line-50"></span><span class="hs-comment">--</span><span>
</span><span id="line-51"></span><span class="hs-comment">-- __NOTE__: The functions in @base-4.12@ changed the serialisation in</span><span>
</span><span id="line-52"></span><span class="hs-comment">-- case of a @Just 0@ precision; this version of @text@ still provides</span><span>
</span><span id="line-53"></span><span class="hs-comment">-- the serialisation as implemented in @base-4.11@. The next major</span><span>
</span><span id="line-54"></span><span class="hs-comment">-- version of @text@ will switch to the more correct @base-4.12@ serialisation.</span><span>
</span><span id="line-55"></span><span id="local-6989586621679115650"><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#formatRealFloat"><span class="hs-identifier hs-type">formatRealFloat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679115650"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span>
</span><span id="line-56"></span><span>                   </span><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#FPFormat"><span class="hs-identifier hs-type">FPFormat</span></a></span><span>
</span><span id="line-57"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>  </span><span class="hs-comment">-- ^ Number of decimal places to render.</span><span>
</span><span id="line-58"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679115650"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-59"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Builder.html#Builder"><span class="hs-identifier hs-type">Builder</span></a></span></span><span>
</span><span id="line-60"></span><span class="hs-pragma">{-# SPECIALIZE</span><span> </span><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#formatRealFloat"><span class="hs-pragma hs-type">formatRealFloat</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#FPFormat"><span class="hs-pragma hs-type">FPFormat</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-pragma hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-pragma hs-type">Int</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-pragma hs-type">Float</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Builder.html#Builder"><span class="hs-pragma hs-type">Builder</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-61"></span><span class="hs-pragma">{-# SPECIALIZE</span><span> </span><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#formatRealFloat"><span class="hs-pragma hs-type">formatRealFloat</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#FPFormat"><span class="hs-pragma hs-type">FPFormat</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-pragma hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-pragma hs-type">Int</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Builder.html#Builder"><span class="hs-pragma hs-type">Builder</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-62"></span><span id="formatRealFloat"><span class="annot"><span class="annottext">formatRealFloat :: forall a. RealFloat a =&gt; FPFormat -&gt; Maybe Int -&gt; a -&gt; Builder
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#formatRealFloat"><span class="hs-identifier hs-var hs-var">formatRealFloat</span></a></span></span><span> </span><span id="local-6989586621679115457"><span class="annot"><span class="annottext">FPFormat
</span><a href="#local-6989586621679115457"><span class="hs-identifier hs-var">fmt</span></a></span></span><span> </span><span id="local-6989586621679115456"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679115456"><span class="hs-identifier hs-var">decs</span></a></span></span><span> </span><span id="local-6989586621679115455"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679115455"><span class="hs-identifier hs-var">x</span></a></span></span><span>
</span><span id="line-63"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
forall a. RealFloat a =&gt; a -&gt; Bool
</span><a href="../../base/src/GHC.Float.html#isNaN"><span class="hs-identifier hs-var">isNaN</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679115455"><span class="hs-identifier hs-var">x</span></a></span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder
</span><span class="hs-string">&quot;NaN&quot;</span></span><span>
</span><span id="line-64"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
forall a. RealFloat a =&gt; a -&gt; Bool
</span><a href="../../base/src/GHC.Float.html#isInfinite"><span class="hs-identifier hs-var">isInfinite</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679115455"><span class="hs-identifier hs-var">x</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679115455"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Builder
</span><span class="hs-string">&quot;-Infinity&quot;</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Builder
</span><span class="hs-string">&quot;Infinity&quot;</span></span><span>
</span><span id="line-65"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679115455"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
forall a. RealFloat a =&gt; a -&gt; Bool
</span><a href="../../base/src/GHC.Float.html#isNegativeZero"><span class="hs-identifier hs-var">isNegativeZero</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679115455"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Builder
</span><a href="Data.Text.Internal.Builder.html#singleton"><span class="hs-identifier hs-var">singleton</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
</span><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FPFormat -&gt; ([Int], Int) -&gt; Builder
</span><a href="#local-6989586621679115448"><span class="hs-identifier hs-var">doFmt</span></a></span><span> </span><span class="annot"><span class="annottext">FPFormat
</span><a href="#local-6989586621679115457"><span class="hs-identifier hs-var">fmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; ([Int], Int)
forall a. RealFloat a =&gt; a -&gt; ([Int], Int)
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#floatToDigits"><span class="hs-identifier hs-var">floatToDigits</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679115455"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-66"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FPFormat -&gt; ([Int], Int) -&gt; Builder
</span><a href="#local-6989586621679115448"><span class="hs-identifier hs-var">doFmt</span></a></span><span> </span><span class="annot"><span class="annottext">FPFormat
</span><a href="#local-6989586621679115457"><span class="hs-identifier hs-var">fmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; ([Int], Int)
forall a. RealFloat a =&gt; a -&gt; ([Int], Int)
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#floatToDigits"><span class="hs-identifier hs-var">floatToDigits</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679115455"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-67"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-68"></span><span>  </span><span id="local-6989586621679115448"><span class="annot"><span class="annottext">doFmt :: FPFormat -&gt; ([Int], Int) -&gt; Builder
</span><a href="#local-6989586621679115448"><span class="hs-identifier hs-var hs-var">doFmt</span></a></span></span><span> </span><span id="local-6989586621679115404"><span class="annot"><span class="annottext">FPFormat
</span><a href="#local-6989586621679115404"><span class="hs-identifier hs-var">format</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679115403"><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679115403"><span class="hs-identifier hs-var">is</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679115402"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115402"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-69"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679115401"><span class="annot"><span class="annottext">ds :: [Char]
</span><a href="#local-6989586621679115401"><span class="hs-identifier hs-var hs-var">ds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Char) -&gt; [Int] -&gt; [Char]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="Data.Text.Internal.Builder.Functions.html#i2d"><span class="hs-identifier hs-var">i2d</span></a></span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679115403"><span class="hs-identifier hs-var">is</span></a></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-70"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FPFormat
</span><a href="#local-6989586621679115404"><span class="hs-identifier hs-var">format</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-71"></span><span>     </span><span class="annot"><span class="annottext">FPFormat
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#Generic"><span class="hs-identifier hs-var">Generic</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-72"></span><span>      </span><span class="annot"><span class="annottext">FPFormat -&gt; ([Int], Int) -&gt; Builder
</span><a href="#local-6989586621679115448"><span class="hs-identifier hs-var">doFmt</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115402"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115402"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">7</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">FPFormat
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#Exponent"><span class="hs-identifier hs-var">Exponent</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">FPFormat
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#Fixed"><span class="hs-identifier hs-var">Fixed</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-73"></span><span>            </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679115403"><span class="hs-identifier hs-var">is</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115402"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-74"></span><span>     </span><span class="annot"><span class="annottext">FPFormat
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#Exponent"><span class="hs-identifier hs-var">Exponent</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-75"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679115456"><span class="hs-identifier hs-var">decs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-76"></span><span>       </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-77"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679115396"><span class="annot"><span class="annottext">show_e' :: Builder
</span><a href="#local-6989586621679115396"><span class="hs-identifier hs-var hs-var">show_e'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Builder
forall a. Integral a =&gt; a -&gt; Builder
</span><a href="Data.Text.Lazy.Builder.Int.html#decimal"><span class="hs-identifier hs-var">decimal</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115402"><span class="hs-identifier hs-var">e</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-78"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115401"><span class="hs-identifier hs-var">ds</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-79"></span><span>          </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;0&quot;</span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Builder
</span><span class="hs-string">&quot;0.0e0&quot;</span></span><span>
</span><span id="line-80"></span><span>          </span><span class="hs-special">[</span><span id="local-6989586621679115395"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679115395"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">]</span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Builder
</span><a href="Data.Text.Internal.Builder.html#singleton"><span class="hs-identifier hs-var">singleton</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679115395"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
</span><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Builder
</span><span class="hs-string">&quot;.0e&quot;</span></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
</span><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679115396"><span class="hs-identifier hs-var">show_e'</span></a></span><span>
</span><span id="line-81"></span><span>          </span><span class="hs-special">(</span><span id="local-6989586621679115394"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679115394"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679115393"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115393"><span class="hs-identifier hs-var">ds'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Builder
</span><a href="Data.Text.Internal.Builder.html#singleton"><span class="hs-identifier hs-var">singleton</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679115394"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
</span><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Builder
</span><a href="Data.Text.Internal.Builder.html#singleton"><span class="hs-identifier hs-var">singleton</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
</span><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Builder
</span><a href="Data.Text.Internal.Builder.html#fromString"><span class="hs-identifier hs-var">fromString</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115393"><span class="hs-identifier hs-var">ds'</span></a></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
</span><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Builder
</span><a href="Data.Text.Internal.Builder.html#singleton"><span class="hs-identifier hs-var">singleton</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'e'</span></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
</span><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679115396"><span class="hs-identifier hs-var">show_e'</span></a></span><span>
</span><span id="line-82"></span><span>          </span><span class="hs-special">[</span><span class="hs-special">]</span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Builder
forall a. HasCallStack =&gt; [Char] -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;formatRealFloat/doFmt/Exponent/Nothing: []&quot;</span></span><span>
</span><span id="line-83"></span><span>       </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679115390"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115390"><span class="hs-identifier hs-var">dec</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-84"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679115387"><span class="annot"><span class="annottext">dec' :: Int
</span><a href="#local-6989586621679115387"><span class="hs-identifier hs-var hs-var">dec'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#max"><span class="hs-identifier hs-var">max</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115390"><span class="hs-identifier hs-var">dec</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-85"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679115403"><span class="hs-identifier hs-var">is</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-86"></span><span>         </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Builder
</span><span class="hs-string">&quot;0.&quot;</span></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
</span><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Text -&gt; Builder
</span><a href="Data.Text.Internal.Builder.html#fromText"><span class="hs-identifier hs-var">fromText</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Text -&gt; Text
</span><a href="Data.Text.html#replicate"><span class="hs-identifier hs-var">T.replicate</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115387"><span class="hs-identifier hs-var">dec'</span></a></span><span> </span><span class="annot"><span class="annottext">Text
</span><span class="hs-string">&quot;0&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
</span><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Builder
</span><span class="hs-string">&quot;e0&quot;</span></span><span>
</span><span id="line-87"></span><span>         </span><span class="annot"><span class="annottext">[Int]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-88"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679115381"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115381"><span class="hs-identifier hs-var">ei</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679115380"><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679115380"><span class="hs-identifier hs-var">is'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [Int] -&gt; (Int, [Int])
</span><a href="Data.Text.Internal.Builder.RealFloat.Functions.html#roundTo"><span class="hs-identifier hs-var">roundTo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115387"><span class="hs-identifier hs-var">dec'</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679115403"><span class="hs-identifier hs-var">is</span></a></span><span>
</span><span id="line-89"></span><span>              </span><span id="local-6989586621679115376"><span class="annot"><span class="annottext">is'' :: [Char]
</span><a href="#local-6989586621679115376"><span class="hs-identifier hs-var hs-var">is''</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Char) -&gt; [Int] -&gt; [Char]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="Data.Text.Internal.Builder.Functions.html#i2d"><span class="hs-identifier hs-var">i2d</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115381"><span class="hs-identifier hs-var">ei</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">[Int] -&gt; [Int]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#init"><span class="hs-identifier hs-var">init</span></a></span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679115380"><span class="hs-identifier hs-var">is'</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679115380"><span class="hs-identifier hs-var">is'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-90"></span><span>          </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115376"><span class="hs-identifier hs-var">is''</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-91"></span><span>               </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Builder
forall a. HasCallStack =&gt; [Char] -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;formatRealFloat/doFmt/Exponent/Just: []&quot;</span></span><span>
</span><span id="line-92"></span><span>               </span><span class="hs-special">(</span><span id="local-6989586621679115374"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679115374"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679115373"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115373"><span class="hs-identifier hs-var">ds'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Builder
</span><a href="Data.Text.Internal.Builder.html#singleton"><span class="hs-identifier hs-var">singleton</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679115374"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
</span><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Builder
</span><a href="Data.Text.Internal.Builder.html#singleton"><span class="hs-identifier hs-var">singleton</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
</span><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Builder
</span><a href="Data.Text.Internal.Builder.html#fromString"><span class="hs-identifier hs-var">fromString</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115373"><span class="hs-identifier hs-var">ds'</span></a></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
</span><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Builder
</span><a href="Data.Text.Internal.Builder.html#singleton"><span class="hs-identifier hs-var">singleton</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'e'</span></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
</span><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Builder
forall a. Integral a =&gt; a -&gt; Builder
</span><a href="Data.Text.Lazy.Builder.Int.html#decimal"><span class="hs-identifier hs-var">decimal</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115402"><span class="hs-identifier hs-var">e</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115381"><span class="hs-identifier hs-var">ei</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-93"></span><span>     </span><span class="annot"><span class="annottext">FPFormat
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#Fixed"><span class="hs-identifier hs-var">Fixed</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-94"></span><span>      </span><span class="hs-keyword">let</span><span>
</span><span id="line-95"></span><span>       </span><span id="local-6989586621679115367"><span class="annot"><span class="annottext">mk0 :: [Char] -&gt; Builder
</span><a href="#local-6989586621679115367"><span class="hs-identifier hs-var hs-var">mk0</span></a></span></span><span> </span><span id="local-6989586621679115366"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115366"><span class="hs-identifier hs-var">ls</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115366"><span class="hs-identifier hs-var">ls</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Builder
</span><span class="hs-string">&quot;0&quot;</span></span><span> </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Builder
</span><a href="Data.Text.Internal.Builder.html#fromString"><span class="hs-identifier hs-var">fromString</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115366"><span class="hs-identifier hs-var">ls</span></a></span><span class="hs-special">}</span><span>
</span><span id="line-96"></span><span>      </span><span class="hs-keyword">in</span><span>
</span><span id="line-97"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679115456"><span class="hs-identifier hs-var">decs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-98"></span><span>       </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-99"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115402"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Builder
</span><span class="hs-string">&quot;0.&quot;</span></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
</span><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Text -&gt; Builder
</span><a href="Data.Text.Internal.Builder.html#fromText"><span class="hs-identifier hs-var">fromText</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Text -&gt; Text
</span><a href="Data.Text.html#replicate"><span class="hs-identifier hs-var">T.replicate</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115402"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Text
</span><span class="hs-string">&quot;0&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
</span><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Builder
</span><a href="Data.Text.Internal.Builder.html#fromString"><span class="hs-identifier hs-var">fromString</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115401"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-100"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-101"></span><span>             </span><span class="hs-keyword">let</span><span>
</span><span id="line-102"></span><span>                </span><span id="local-6989586621679115351"><span class="annot"><span class="annottext">f :: a -&gt; [Char] -&gt; [Char] -&gt; Builder
</span><a href="#local-6989586621679115351"><span class="hs-identifier hs-var hs-var">f</span></a></span></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span id="local-6989586621679115350"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115350"><span class="hs-identifier hs-var">s</span></a></span></span><span>    </span><span id="local-6989586621679115349"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115349"><span class="hs-identifier hs-var">rs</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Builder
</span><a href="#local-6989586621679115367"><span class="hs-identifier hs-var">mk0</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ShowS
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115350"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
</span><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Builder
</span><a href="Data.Text.Internal.Builder.html#singleton"><span class="hs-identifier hs-var">singleton</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
</span><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Builder
</span><a href="#local-6989586621679115367"><span class="hs-identifier hs-var">mk0</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115349"><span class="hs-identifier hs-var">rs</span></a></span><span>
</span><span id="line-103"></span><span>                </span><span class="annot"><a href="#local-6989586621679115351"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span id="local-6989586621679115347"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679115347"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679115346"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115346"><span class="hs-identifier hs-var">s</span></a></span></span><span>    </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;&quot;</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; [Char] -&gt; [Char] -&gt; Builder
</span><a href="#local-6989586621679115351"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679115347"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115346"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-104"></span><span>                </span><span class="annot"><a href="#local-6989586621679115351"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span id="local-6989586621679115345"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679115345"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679115344"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115344"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679115343"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679115343"><span class="hs-identifier hs-var">r</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679115342"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115342"><span class="hs-identifier hs-var">rs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; [Char] -&gt; [Char] -&gt; Builder
</span><a href="#local-6989586621679115351"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679115345"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679115343"><span class="hs-identifier hs-var">r</span></a></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115344"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115342"><span class="hs-identifier hs-var">rs</span></a></span><span>
</span><span id="line-105"></span><span>             </span><span class="hs-keyword">in</span><span>
</span><span id="line-106"></span><span>                </span><span class="annot"><span class="annottext">Int -&gt; [Char] -&gt; [Char] -&gt; Builder
forall {a}. (Eq a, Num a) =&gt; a -&gt; [Char] -&gt; [Char] -&gt; Builder
</span><a href="#local-6989586621679115351"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115402"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115401"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-107"></span><span>       </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679115341"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115341"><span class="hs-identifier hs-var">dec</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-108"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679115338"><span class="annot"><span class="annottext">dec' :: Int
</span><a href="#local-6989586621679115338"><span class="hs-identifier hs-var hs-var">dec'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#max"><span class="hs-identifier hs-var">max</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115341"><span class="hs-identifier hs-var">dec</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-109"></span><span>        </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115402"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-110"></span><span>         </span><span class="hs-keyword">let</span><span>
</span><span id="line-111"></span><span>          </span><span class="hs-special">(</span><span id="local-6989586621679115336"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115336"><span class="hs-identifier hs-var">ei</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679115335"><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679115335"><span class="hs-identifier hs-var">is'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [Int] -&gt; (Int, [Int])
</span><a href="Data.Text.Internal.Builder.RealFloat.Functions.html#roundTo"><span class="hs-identifier hs-var">roundTo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115338"><span class="hs-identifier hs-var">dec'</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115402"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679115403"><span class="hs-identifier hs-var">is</span></a></span><span>
</span><span id="line-112"></span><span>          </span><span class="hs-special">(</span><span id="local-6989586621679115333"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115333"><span class="hs-identifier hs-var">ls</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679115332"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115332"><span class="hs-identifier hs-var">rs</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [Char] -&gt; ([Char], [Char])
forall a. Int -&gt; [a] -&gt; ([a], [a])
</span><a href="../../base/src/GHC.List.html#splitAt"><span class="hs-identifier hs-var">splitAt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115402"><span class="hs-identifier hs-var">e</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115336"><span class="hs-identifier hs-var">ei</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Int -&gt; Char) -&gt; [Int] -&gt; [Char]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="Data.Text.Internal.Builder.Functions.html#i2d"><span class="hs-identifier hs-var">i2d</span></a></span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679115335"><span class="hs-identifier hs-var">is'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-113"></span><span>         </span><span class="hs-keyword">in</span><span>
</span><span id="line-114"></span><span>         </span><span class="annot"><span class="annottext">[Char] -&gt; Builder
</span><a href="#local-6989586621679115367"><span class="hs-identifier hs-var">mk0</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115333"><span class="hs-identifier hs-var">ls</span></a></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
</span><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115332"><span class="hs-identifier hs-var">rs</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Builder
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Builder
</span><a href="Data.Text.Internal.Builder.html#singleton"><span class="hs-identifier hs-var">singleton</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
</span><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Builder
</span><a href="Data.Text.Internal.Builder.html#fromString"><span class="hs-identifier hs-var">fromString</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115332"><span class="hs-identifier hs-var">rs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-115"></span><span>        </span><span class="hs-keyword">else</span><span>
</span><span id="line-116"></span><span>         </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679115327"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115327"><span class="hs-identifier hs-var">ei</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679115326"><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679115326"><span class="hs-identifier hs-var">is'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [Int] -&gt; (Int, [Int])
</span><a href="Data.Text.Internal.Builder.RealFloat.Functions.html#roundTo"><span class="hs-identifier hs-var">roundTo</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115338"><span class="hs-identifier hs-var">dec'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; [Int]
forall a. Int -&gt; a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#replicate"><span class="hs-identifier hs-var">replicate</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115402"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">[Int] -&gt; [Int] -&gt; [Int]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679115403"><span class="hs-identifier hs-var">is</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-117"></span><span>             </span><span id="local-6989586621679115321"><span class="annot"><span class="annottext">is'' :: [Char]
</span><a href="#local-6989586621679115321"><span class="hs-identifier hs-var hs-var">is''</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Char) -&gt; [Int] -&gt; [Char]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="Data.Text.Internal.Builder.Functions.html#i2d"><span class="hs-identifier hs-var">i2d</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115327"><span class="hs-identifier hs-var">ei</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679115326"><span class="hs-identifier hs-var">is'</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="annot"><span class="annottext">Int -&gt; [Int] -&gt; [Int]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679115326"><span class="hs-identifier hs-var">is'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-118"></span><span>         </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115321"><span class="hs-identifier hs-var">is''</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-119"></span><span>              </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Builder
forall a. HasCallStack =&gt; [Char] -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;formatRealFloat/doFmt/Fixed: []&quot;</span></span><span>
</span><span id="line-120"></span><span>              </span><span class="hs-special">(</span><span id="local-6989586621679115320"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679115320"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679115319"><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115319"><span class="hs-identifier hs-var">ds'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Builder
</span><a href="Data.Text.Internal.Builder.html#singleton"><span class="hs-identifier hs-var">singleton</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679115320"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
</span><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115319"><span class="hs-identifier hs-var">ds'</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Builder
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Builder
</span><a href="Data.Text.Internal.Builder.html#singleton"><span class="hs-identifier hs-var">singleton</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
</span><a href="Data.Text.Internal.Builder.Functions.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Builder
</span><a href="Data.Text.Internal.Builder.html#fromString"><span class="hs-identifier hs-var">fromString</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><a href="#local-6989586621679115319"><span class="hs-identifier hs-var">ds'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-121"></span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span class="hs-comment">-- Based on &quot;Printing Floating-Point Numbers Quickly and Accurately&quot;</span><span>
</span><span id="line-124"></span><span class="hs-comment">-- by R.G. Burger and R.K. Dybvig in PLDI 96.</span><span>
</span><span id="line-125"></span><span class="hs-comment">-- This version uses a much slower logarithm estimator. It should be improved.</span><span>
</span><span id="line-126"></span><span>
</span><span id="line-127"></span><span class="hs-comment">-- | 'floatToDigits' takes a base and a non-negative 'RealFloat' number,</span><span>
</span><span id="line-128"></span><span class="hs-comment">-- and returns a list of digits and an exponent.</span><span>
</span><span id="line-129"></span><span class="hs-comment">-- In particular, if @x&gt;=0@, and</span><span>
</span><span id="line-130"></span><span class="hs-comment">--</span><span>
</span><span id="line-131"></span><span class="hs-comment">-- &gt; floatToDigits base x = ([d1,d2,...,dn], e)</span><span>
</span><span id="line-132"></span><span class="hs-comment">--</span><span>
</span><span id="line-133"></span><span class="hs-comment">-- then</span><span>
</span><span id="line-134"></span><span class="hs-comment">--</span><span>
</span><span id="line-135"></span><span class="hs-comment">--      (1) @n &gt;= 1@</span><span>
</span><span id="line-136"></span><span class="hs-comment">--</span><span>
</span><span id="line-137"></span><span class="hs-comment">--      (2) @x = 0.d1d2...dn * (base**e)@</span><span>
</span><span id="line-138"></span><span class="hs-comment">--</span><span>
</span><span id="line-139"></span><span class="hs-comment">--      (3) @0 &lt;= di &lt;= base-1@</span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span id="local-6989586621679115643"><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#floatToDigits"><span class="hs-identifier hs-type">floatToDigits</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679115643"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679115643"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-142"></span><span class="hs-pragma">{-# SPECIALIZE</span><span> </span><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#floatToDigits"><span class="hs-pragma hs-type">floatToDigits</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-pragma hs-type">Float</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-pragma hs-type">Int</span></a></span><span class="hs-pragma">]</span><span class="hs-pragma">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-pragma hs-type">Int</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-143"></span><span class="hs-pragma">{-# SPECIALIZE</span><span> </span><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#floatToDigits"><span class="hs-pragma hs-type">floatToDigits</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-pragma hs-type">Int</span></a></span><span class="hs-pragma">]</span><span class="hs-pragma">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-pragma hs-type">Int</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-144"></span><span id="floatToDigits"><span class="annot"><span class="annottext">floatToDigits :: forall a. RealFloat a =&gt; a -&gt; ([Int], Int)
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#floatToDigits"><span class="hs-identifier hs-var hs-var">floatToDigits</span></a></span></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>
</span><span id="line-145"></span><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#floatToDigits"><span class="hs-identifier hs-var">floatToDigits</span></a></span><span> </span><span id="local-6989586621679115286"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679115286"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-146"></span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-147"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679115284"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115284"><span class="hs-identifier hs-var">f0</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679115283"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115283"><span class="hs-identifier hs-var">e0</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; (Integer, Int)
forall a. RealFloat a =&gt; a -&gt; (Integer, Int)
</span><a href="../../base/src/GHC.Float.html#decodeFloat"><span class="hs-identifier hs-var">decodeFloat</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679115286"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-148"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679115280"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115280"><span class="hs-identifier hs-var">minExp0</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; (Int, Int)
forall a. RealFloat a =&gt; a -&gt; (Int, Int)
</span><a href="../../base/src/GHC.Float.html#floatRange"><span class="hs-identifier hs-var">floatRange</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679115286"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-149"></span><span>  </span><span id="local-6989586621679115277"><span class="annot"><span class="annottext">p :: Int
</span><a href="#local-6989586621679115277"><span class="hs-identifier hs-var hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Int
forall a. RealFloat a =&gt; a -&gt; Int
</span><a href="../../base/src/GHC.Float.html#floatDigits"><span class="hs-identifier hs-var">floatDigits</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679115286"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-150"></span><span>  </span><span id="local-6989586621679115274"><span class="annot"><span class="annottext">b :: Integer
</span><a href="#local-6989586621679115274"><span class="hs-identifier hs-var hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Integer
forall a. RealFloat a =&gt; a -&gt; Integer
</span><a href="../../base/src/GHC.Float.html#floatRadix"><span class="hs-identifier hs-var">floatRadix</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679115286"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-151"></span><span>  </span><span id="local-6989586621679115271"><span class="annot"><span class="annottext">minExp :: Int
</span><a href="#local-6989586621679115271"><span class="hs-identifier hs-var hs-var">minExp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115280"><span class="hs-identifier hs-var">minExp0</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115277"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-comment">-- the real minimum exponent</span><span>
</span><span id="line-152"></span><span>  </span><span class="hs-comment">-- Haskell requires that f be adjusted so denormalized numbers</span><span>
</span><span id="line-153"></span><span>  </span><span class="hs-comment">-- will have an impossibly low exponent.  Adjust for this.</span><span>
</span><span id="line-154"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679115265"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115265"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679115264"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115264"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-155"></span><span>   </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679115262"><span class="annot"><span class="annottext">n :: Int
</span><a href="#local-6989586621679115262"><span class="hs-identifier hs-var hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115271"><span class="hs-identifier hs-var">minExp</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115283"><span class="hs-identifier hs-var">e0</span></a></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-156"></span><span>   </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115262"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115284"><span class="hs-identifier hs-var">f0</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Integral a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Real.html#quot"><span class="hs-operator hs-var">`quot`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115274"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115262"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115283"><span class="hs-identifier hs-var">e0</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115262"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115284"><span class="hs-identifier hs-var">f0</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115283"><span class="hs-identifier hs-var">e0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-157"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679115223"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115223"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679115222"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115222"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679115221"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115221"><span class="hs-identifier hs-var">mUp</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679115220"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115220"><span class="hs-identifier hs-var">mDn</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-158"></span><span>   </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115264"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-159"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679115219"><span class="annot"><span class="annottext">be :: Integer
</span><a href="#local-6989586621679115219"><span class="hs-identifier hs-var hs-var">be</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115274"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115264"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-160"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115265"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115274"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115277"><span class="hs-identifier hs-var">p</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-161"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115265"><span class="hs-identifier hs-var">f</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115219"><span class="hs-identifier hs-var">be</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115274"><span class="hs-identifier hs-var">b</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115274"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115219"><span class="hs-identifier hs-var">be</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115274"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115219"><span class="hs-identifier hs-var">be</span></a></span><span class="hs-special">)</span><span>     </span><span class="hs-comment">-- according to Burger and Dybvig</span><span>
</span><span id="line-162"></span><span>    </span><span class="hs-keyword">else</span><span>
</span><span id="line-163"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115265"><span class="hs-identifier hs-var">f</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115219"><span class="hs-identifier hs-var">be</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115219"><span class="hs-identifier hs-var">be</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115219"><span class="hs-identifier hs-var">be</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-164"></span><span>   </span><span class="hs-keyword">else</span><span>
</span><span id="line-165"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115264"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115271"><span class="hs-identifier hs-var">minExp</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115265"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115274"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115277"><span class="hs-identifier hs-var">p</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-166"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115265"><span class="hs-identifier hs-var">f</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115274"><span class="hs-identifier hs-var">b</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115274"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115264"><span class="hs-identifier hs-var">e</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115274"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-167"></span><span>    </span><span class="hs-keyword">else</span><span>
</span><span id="line-168"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115265"><span class="hs-identifier hs-var">f</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115274"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115264"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-169"></span><span>  </span><span class="annot"><a href="#local-6989586621679115216"><span class="hs-identifier hs-type">k</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-170"></span><span>  </span><span id="local-6989586621679115216"><span class="annot"><span class="annottext">k :: Int
</span><a href="#local-6989586621679115216"><span class="hs-identifier hs-var hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-171"></span><span>   </span><span class="hs-keyword">let</span><span>
</span><span id="line-172"></span><span>    </span><span class="annot"><a href="#local-6989586621679115215"><span class="hs-identifier hs-type">k0</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-173"></span><span>    </span><span id="local-6989586621679115215"><span class="annot"><span class="annottext">k0 :: Int
</span><a href="#local-6989586621679115215"><span class="hs-identifier hs-var hs-var">k0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-174"></span><span>     </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115274"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-175"></span><span>        </span><span class="hs-comment">-- logBase 10 2 is very slightly larger than 8651/28738</span><span>
</span><span id="line-176"></span><span>        </span><span class="hs-comment">-- (about 5.3558e-10), so if log x &gt;= 0, the approximation</span><span>
</span><span id="line-177"></span><span>        </span><span class="hs-comment">-- k1 is too small, hence we add one and need one fixup step less.</span><span>
</span><span id="line-178"></span><span>        </span><span class="hs-comment">-- If log x &lt; 0, the approximation errs rather on the high side.</span><span>
</span><span id="line-179"></span><span>        </span><span class="hs-comment">-- That is usually more than compensated for by ignoring the</span><span>
</span><span id="line-180"></span><span>        </span><span class="hs-comment">-- fractional part of logBase 2 x, but when x is a power of 1/2</span><span>
</span><span id="line-181"></span><span>        </span><span class="hs-comment">-- or slightly larger and the exponent is a multiple of the</span><span>
</span><span id="line-182"></span><span>        </span><span class="hs-comment">-- denominator of the rational approximation to logBase 10 2,</span><span>
</span><span id="line-183"></span><span>        </span><span class="hs-comment">-- k1 is larger than logBase 10 x. If k1 &gt; 1 + logBase 10 x,</span><span>
</span><span id="line-184"></span><span>        </span><span class="hs-comment">-- we get a leading zero-digit we don't want.</span><span>
</span><span id="line-185"></span><span>        </span><span class="hs-comment">-- With the approximation 3/10, this happened for</span><span>
</span><span id="line-186"></span><span>        </span><span class="hs-comment">-- 0.5^1030, 0.5^1040, ..., 0.5^1070 and values close above.</span><span>
</span><span id="line-187"></span><span>        </span><span class="hs-comment">-- The approximation 8651/28738 guarantees k1 &lt; 1 + logBase 10 x</span><span>
</span><span id="line-188"></span><span>        </span><span class="hs-comment">-- for IEEE-ish floating point types with exponent fields</span><span>
</span><span id="line-189"></span><span>        </span><span class="hs-comment">-- &lt;= 17 bits and mantissae of several thousand bits, earlier</span><span>
</span><span id="line-190"></span><span>        </span><span class="hs-comment">-- convergents to logBase 10 2 would fail for long double.</span><span>
</span><span id="line-191"></span><span>        </span><span class="hs-comment">-- Using quot instead of div is a little faster and requires</span><span>
</span><span id="line-192"></span><span>        </span><span class="hs-comment">-- fewer fixup steps for negative lx.</span><span>
</span><span id="line-193"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679115211"><span class="annot"><span class="annottext">lx :: Int
</span><a href="#local-6989586621679115211"><span class="hs-identifier hs-var hs-var">lx</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115277"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115283"><span class="hs-identifier hs-var">e0</span></a></span><span>
</span><span id="line-194"></span><span>            </span><span id="local-6989586621679115206"><span class="annot"><span class="annottext">k1 :: Int
</span><a href="#local-6989586621679115206"><span class="hs-identifier hs-var hs-var">k1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115211"><span class="hs-identifier hs-var">lx</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8651</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Integral a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Real.html#quot"><span class="hs-operator hs-var">`quot`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">28738</span></span><span>
</span><span id="line-195"></span><span>        </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115211"><span class="hs-identifier hs-var">lx</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115206"><span class="hs-identifier hs-var">k1</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115206"><span class="hs-identifier hs-var">k1</span></a></span><span>
</span><span id="line-196"></span><span>     </span><span class="hs-keyword">else</span><span>
</span><span id="line-197"></span><span>        </span><span class="hs-comment">-- f :: Integer, log :: Float -&gt; Float,</span><span>
</span><span id="line-198"></span><span>        </span><span class="hs-comment">--               ceiling :: Float -&gt; Int</span><span>
</span><span id="line-199"></span><span>        </span><span class="annot"><span class="annottext">Float -&gt; Int
forall a b. (RealFrac a, Integral b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#ceiling"><span class="hs-identifier hs-var">ceiling</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float -&gt; Float
forall a. Floating a =&gt; a -&gt; a
</span><a href="../../base/src/GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Float
forall a. Num a =&gt; Integer -&gt; a
</span><a href="../../base/src/GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115265"><span class="hs-identifier hs-var">f</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span>
</span><span id="line-200"></span><span>                 </span><span class="annot"><span class="annottext">Int -&gt; Float
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#intToFloat"><span class="hs-identifier hs-var">intToFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115264"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float
forall a. Floating a =&gt; a -&gt; a
</span><a href="../../base/src/GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Float
forall a. Num a =&gt; Integer -&gt; a
</span><a href="../../base/src/GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115274"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span>
</span><span id="line-201"></span><span>                   </span><span class="annot"><span class="annottext">Float -&gt; Float
forall a. Floating a =&gt; a -&gt; a
</span><a href="../../base/src/GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">10</span></span><span class="hs-special">)</span><span>
</span><span id="line-202"></span><span class="hs-comment">--WAS:            fromInt e * log (fromInteger b))</span><span>
</span><span id="line-203"></span><span>
</span><span id="line-204"></span><span>    </span><span id="local-6989586621679115187"><span class="annot"><span class="annottext">fixup :: Int -&gt; Int
</span><a href="#local-6989586621679115187"><span class="hs-identifier hs-var hs-var">fixup</span></a></span></span><span> </span><span id="local-6989586621679115186"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115186"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-205"></span><span>      </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115186"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-206"></span><span>        </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115223"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115221"><span class="hs-identifier hs-var">mUp</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">10</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115186"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115222"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115186"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int
</span><a href="#local-6989586621679115187"><span class="hs-identifier hs-var">fixup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115186"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-207"></span><span>      </span><span class="hs-keyword">else</span><span>
</span><span id="line-208"></span><span>        </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">10</span></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115186"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115223"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115221"><span class="hs-identifier hs-var">mUp</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115222"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115186"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int
</span><a href="#local-6989586621679115187"><span class="hs-identifier hs-var">fixup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115186"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-209"></span><span>   </span><span class="hs-keyword">in</span><span>
</span><span id="line-210"></span><span>   </span><span class="annot"><span class="annottext">Int -&gt; Int
</span><a href="#local-6989586621679115187"><span class="hs-identifier hs-var">fixup</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115215"><span class="hs-identifier hs-var">k0</span></a></span><span>
</span><span id="line-211"></span><span>
</span><span id="line-212"></span><span>  </span><span id="local-6989586621679115170"><span class="annot"><span class="annottext">gen :: [t] -&gt; t -&gt; t -&gt; t -&gt; t -&gt; [t]
</span><a href="#local-6989586621679115170"><span class="hs-identifier hs-var hs-var">gen</span></a></span></span><span> </span><span id="local-6989586621679115169"><span class="annot"><span class="annottext">[t]
</span><a href="#local-6989586621679115169"><span class="hs-identifier hs-var">ds</span></a></span></span><span> </span><span id="local-6989586621679115168"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115168"><span class="hs-identifier hs-var">rn</span></a></span></span><span> </span><span id="local-6989586621679115167"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115167"><span class="hs-identifier hs-var">sN</span></a></span></span><span> </span><span id="local-6989586621679115166"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115166"><span class="hs-identifier hs-var">mUpN</span></a></span></span><span> </span><span id="local-6989586621679115165"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115165"><span class="hs-identifier hs-var">mDnN</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-213"></span><span>   </span><span class="hs-keyword">let</span><span>
</span><span id="line-214"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679115161"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115161"><span class="hs-identifier hs-var">dn</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679115160"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115160"><span class="hs-identifier hs-var">rn'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115168"><span class="hs-identifier hs-var">rn</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t -&gt; t
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><span class="hs-number">10</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">t -&gt; t -&gt; (t, t)
forall a. Integral a =&gt; a -&gt; a -&gt; (a, a)
</span><a href="../../base/src/GHC.Real.html#quotRem"><span class="hs-operator hs-var">`quotRem`</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115167"><span class="hs-identifier hs-var">sN</span></a></span><span>
</span><span id="line-215"></span><span>    </span><span id="local-6989586621679115156"><span class="annot"><span class="annottext">mUpN' :: t
</span><a href="#local-6989586621679115156"><span class="hs-identifier hs-var hs-var">mUpN'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115166"><span class="hs-identifier hs-var">mUpN</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t -&gt; t
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><span class="hs-number">10</span></span><span>
</span><span id="line-216"></span><span>    </span><span id="local-6989586621679115153"><span class="annot"><span class="annottext">mDnN' :: t
</span><a href="#local-6989586621679115153"><span class="hs-identifier hs-var hs-var">mDnN'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115165"><span class="hs-identifier hs-var">mDnN</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t -&gt; t
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><span class="hs-number">10</span></span><span>
</span><span id="line-217"></span><span>   </span><span class="hs-keyword">in</span><span>
</span><span id="line-218"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115160"><span class="hs-identifier hs-var">rn'</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115153"><span class="hs-identifier hs-var">mDnN'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115160"><span class="hs-identifier hs-var">rn'</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t -&gt; t
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115156"><span class="hs-identifier hs-var">mUpN'</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115167"><span class="hs-identifier hs-var">sN</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-219"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115161"><span class="hs-identifier hs-var">dn</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; [t] -&gt; [t]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[t]
</span><a href="#local-6989586621679115169"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-220"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115161"><span class="hs-identifier hs-var">dn</span></a></span><span class="annot"><span class="annottext">t -&gt; t -&gt; t
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">t
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">t -&gt; [t] -&gt; [t]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[t]
</span><a href="#local-6989586621679115169"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-221"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115160"><span class="hs-identifier hs-var">rn'</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t -&gt; t
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">t -&gt; t -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115167"><span class="hs-identifier hs-var">sN</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115161"><span class="hs-identifier hs-var">dn</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; [t] -&gt; [t]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[t]
</span><a href="#local-6989586621679115169"><span class="hs-identifier hs-var">ds</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115161"><span class="hs-identifier hs-var">dn</span></a></span><span class="annot"><span class="annottext">t -&gt; t -&gt; t
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">t
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">t -&gt; [t] -&gt; [t]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[t]
</span><a href="#local-6989586621679115169"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-222"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[t] -&gt; t -&gt; t -&gt; t -&gt; t -&gt; [t]
</span><a href="#local-6989586621679115170"><span class="hs-identifier hs-var">gen</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115161"><span class="hs-identifier hs-var">dn</span></a></span><span class="annot"><span class="annottext">t -&gt; [t] -&gt; [t]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">[t]
</span><a href="#local-6989586621679115169"><span class="hs-identifier hs-var">ds</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115160"><span class="hs-identifier hs-var">rn'</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115167"><span class="hs-identifier hs-var">sN</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115156"><span class="hs-identifier hs-var">mUpN'</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679115153"><span class="hs-identifier hs-var">mDnN'</span></a></span><span>
</span><span id="line-223"></span><span>
</span><span id="line-224"></span><span>  </span><span id="local-6989586621679115144"><span class="annot"><span class="annottext">rds :: [Integer]
</span><a href="#local-6989586621679115144"><span class="hs-identifier hs-var hs-var">rds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-225"></span><span>   </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115216"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-226"></span><span>      </span><span class="annot"><span class="annottext">[Integer] -&gt; Integer -&gt; Integer -&gt; Integer -&gt; Integer -&gt; [Integer]
forall {t}. Integral t =&gt; [t] -&gt; t -&gt; t -&gt; t -&gt; t -&gt; [t]
</span><a href="#local-6989586621679115170"><span class="hs-identifier hs-var">gen</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115223"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115222"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">10</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115216"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115221"><span class="hs-identifier hs-var">mUp</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115220"><span class="hs-identifier hs-var">mDn</span></a></span><span>
</span><span id="line-227"></span><span>   </span><span class="hs-keyword">else</span><span>
</span><span id="line-228"></span><span>     </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679115142"><span class="annot"><span class="annottext">bk :: Integer
</span><a href="#local-6989586621679115142"><span class="hs-identifier hs-var hs-var">bk</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#expt"><span class="hs-identifier hs-var">expt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">10</span></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115216"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-229"></span><span>     </span><span class="annot"><span class="annottext">[Integer] -&gt; Integer -&gt; Integer -&gt; Integer -&gt; Integer -&gt; [Integer]
forall {t}. Integral t =&gt; [t] -&gt; t -&gt; t -&gt; t -&gt; t -&gt; [t]
</span><a href="#local-6989586621679115170"><span class="hs-identifier hs-var">gen</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115223"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115142"><span class="hs-identifier hs-var">bk</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115222"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115221"><span class="hs-identifier hs-var">mUp</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115142"><span class="hs-identifier hs-var">bk</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115220"><span class="hs-identifier hs-var">mDn</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115142"><span class="hs-identifier hs-var">bk</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-230"></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-231"></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Integer -&gt; Int) -&gt; [Integer] -&gt; [Int]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a. Num a =&gt; Integer -&gt; a
</span><a href="../../base/src/GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Integer] -&gt; [Integer]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[Integer]
</span><a href="#local-6989586621679115144"><span class="hs-identifier hs-var">rds</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115216"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-232"></span><span>
</span><span id="line-233"></span><span class="hs-comment">-- Exponentiation with a cache for the most common numbers.</span><span>
</span><span id="line-234"></span><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#minExpt"><span class="hs-identifier hs-type">minExpt</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#maxExpt"><span class="hs-identifier hs-type">maxExpt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-235"></span><span id="minExpt"><span class="annot"><span class="annottext">minExpt :: Int
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#minExpt"><span class="hs-identifier hs-var hs-var">minExpt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-236"></span><span id="maxExpt"><span class="annot"><span class="annottext">maxExpt :: Int
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#maxExpt"><span class="hs-identifier hs-var hs-var">maxExpt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1100</span></span><span>
</span><span id="line-237"></span><span>
</span><span id="line-238"></span><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#expt"><span class="hs-identifier hs-type">expt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span>
</span><span id="line-239"></span><span id="expt"><span class="annot"><span class="annottext">expt :: Integer -&gt; Int -&gt; Integer
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#expt"><span class="hs-identifier hs-var hs-var">expt</span></a></span></span><span> </span><span id="local-6989586621679115139"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115139"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span id="local-6989586621679115138"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115138"><span class="hs-identifier hs-var">n</span></a></span></span><span>
</span><span id="line-240"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115139"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115138"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#minExpt"><span class="hs-identifier hs-var">minExpt</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115138"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#maxExpt"><span class="hs-identifier hs-var">maxExpt</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Array Int Integer
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#expts"><span class="hs-identifier hs-var">expts</span></a></span><span> </span><span class="annot"><span class="annottext">Array Int Integer -&gt; Int -&gt; Integer
forall (a :: * -&gt; * -&gt; *) e i.
(IArray a e, Ix i) =&gt;
a i e -&gt; Int -&gt; e
</span><a href="../../array/src/Data.Array.Base.html#unsafeAt"><span class="hs-operator hs-var">`unsafeAt`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115138"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-241"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115139"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">10</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115138"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#maxExpt10"><span class="hs-identifier hs-var">maxExpt10</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Array Int Integer
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#expts10"><span class="hs-identifier hs-var">expts10</span></a></span><span> </span><span class="annot"><span class="annottext">Array Int Integer -&gt; Int -&gt; Integer
forall (a :: * -&gt; * -&gt; *) e i.
(IArray a e, Ix i) =&gt;
a i e -&gt; Int -&gt; e
</span><a href="../../array/src/Data.Array.Base.html#unsafeAt"><span class="hs-operator hs-var">`unsafeAt`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115138"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-242"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679115139"><span class="hs-identifier hs-var">base</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
forall a b. (Num a, Integral b) =&gt; a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Real.html#%5E"><span class="hs-operator hs-var">^</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115138"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-243"></span><span>
</span><span id="line-244"></span><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#expts"><span class="hs-identifier hs-type">expts</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Arr.html#Array"><span class="hs-identifier hs-type">Array</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span>
</span><span id="line-245"></span><span id="expts"><span class="annot"><span class="annottext">expts :: Array Int Integer
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#expts"><span class="hs-identifier hs-var hs-var">expts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int, Int) -&gt; [(Int, Integer)] -&gt; Array Int Integer
forall (a :: * -&gt; * -&gt; *) e i.
(IArray a e, Ix i) =&gt;
(i, i) -&gt; [(i, e)] -&gt; a i e
</span><a href="../../array/src/Data.Array.Base.html#array"><span class="hs-identifier hs-var">array</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#minExpt"><span class="hs-identifier hs-var">minExpt</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#maxExpt"><span class="hs-identifier hs-var">maxExpt</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115132"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">2</span></span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
forall a b. (Num a, Integral b) =&gt; a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Real.html#%5E"><span class="hs-operator hs-var">^</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115132"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679115132"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115132"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#minExpt"><span class="hs-identifier hs-var">minExpt</span></a></span><span> </span><span class="hs-glyph">..</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#maxExpt"><span class="hs-identifier hs-var">maxExpt</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span><span>
</span><span id="line-246"></span><span>
</span><span id="line-247"></span><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#maxExpt10"><span class="hs-identifier hs-type">maxExpt10</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-248"></span><span id="maxExpt10"><span class="annot"><span class="annottext">maxExpt10 :: Int
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#maxExpt10"><span class="hs-identifier hs-var hs-var">maxExpt10</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">324</span></span><span>
</span><span id="line-249"></span><span>
</span><span id="line-250"></span><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#expts10"><span class="hs-identifier hs-type">expts10</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Arr.html#Array"><span class="hs-identifier hs-type">Array</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span>
</span><span id="line-251"></span><span id="expts10"><span class="annot"><span class="annottext">expts10 :: Array Int Integer
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#expts10"><span class="hs-identifier hs-var hs-var">expts10</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int, Int) -&gt; [(Int, Integer)] -&gt; Array Int Integer
forall (a :: * -&gt; * -&gt; *) e i.
(IArray a e, Ix i) =&gt;
(i, i) -&gt; [(i, e)] -&gt; a i e
</span><a href="../../array/src/Data.Array.Base.html#array"><span class="hs-identifier hs-var">array</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#minExpt"><span class="hs-identifier hs-var">minExpt</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#maxExpt10"><span class="hs-identifier hs-var">maxExpt10</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115131"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">10</span></span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
forall a b. (Num a, Integral b) =&gt; a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Real.html#%5E"><span class="hs-operator hs-var">^</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115131"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679115131"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679115131"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#minExpt"><span class="hs-identifier hs-var">minExpt</span></a></span><span> </span><span class="hs-glyph">..</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#maxExpt10"><span class="hs-identifier hs-var">maxExpt10</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span><span>
</span><span id="line-252"></span><span>
</span><span id="line-253"></span><span class="annot"><a href="Data.Text.Lazy.Builder.RealFloat.html#intToFloat"><span class="hs-identifier hs-type">intToFloat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-identifier hs-type">Float</span></a></span><span>
</span><span id="line-254"></span><span id="intToFloat"><span class="annot"><span class="annottext">intToFloat :: Int -&gt; Float
</span><a href="Data.Text.Lazy.Builder.RealFloat.html#intToFloat"><span class="hs-identifier hs-var hs-var">intToFloat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Float
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span>
</span><span id="line-255"></span></pre></body></html>